package com.qulai.amazon_us.domain.amazon_us;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.qulai.common.annotation.Excel;
import com.qulai.common.core.domain.BaseEntity;


import java.util.List;
import java.util.Collections;
import java.util.ArrayList;
import java.util.Arrays;

import com.qulai.common.utils.sql.StringListTypeHandler;
import org.apache.ibatis.type.TypeHandler;

import java.util.List;

/**
 * 上传记录对象 amazon_us_upload
 *
 * @author hunan
 * @date 2025-01-30
 */
public class AmazonUsUpload extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 制作状态 */
    @Excel(name = "制作状态")
    private Integer status;

    /** 运营 */
    @Excel(name = "运营")
    private String optName;

    /** 店铺 */
    @Excel(name = "店铺")
    private String shop;

    /** 品牌 */
    @Excel(name = "品牌")
    private String brand;

    /** 品牌缩写 */
    @Excel(name = "品牌缩写")
    private String brandZip;

    /** 货源平台 */
//    private List<String> basicPlatform;
    private List<String> basicPlatform = new ArrayList<>();

    /** 主图换新 */
    private String basicProductIndex;
    /** 大类目 */
    @Excel(name = "大类目")
    private String className;

    /** 小类目 */
    @Excel(name = "小类目")
    private String productType;

    /** 上传数量 */
    @Excel(name = "上传数量")
    private Integer uploadLimit;

    private Integer limitImg;

    private String price;


    private List<String> notClassNameList;

    /** 上传轮数 */
    private Integer times;

    /** 上传轮数 */
    @Excel(name = "任务数")
    private Integer uploadTaskNum;

    /** 上传轮数 */
    private String host;


    // Getter and Setter for notClassNameList
    public List<String> getNotClassNameList() {
        return notClassNameList;
    }

    public void setNotClassNameList(List<String> notClassNameList) {
        this.notClassNameList = notClassNameList;
    }


    public void setPrice(String price) {
        this.price = price;
    }

    public String getPrice() {return price;}

    public void setLimitImg(Integer limitImg)
    {
        this.limitImg = limitImg;
    }

    public Integer getLimitImg()
    {
        return limitImg;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setOptName(String optName)
    {
        this.optName = optName;
    }

    public String getOptName()
    {
        return optName;
    }
    public void setShop(String shop)
    {
        this.shop = shop;
    }

    public String getShop()
    {
        return shop;
    }
    public void setBrand(String brand)
    {
        this.brand = brand;
    }

    public String getBrand()
    {
        return brand;
    }
    public void setBrandZip(String brandZip)
    {
        this.brandZip = brandZip;
    }

    public String getBrandZip()
    {
        return brandZip;
    }

    // 确保返回非空列表
    public List<String> getBasicPlatform() {
        if (basicPlatform == null) {
            return Collections.emptyList();
        }
        return basicPlatform;
    }

    public void setBasicPlatform(List<String> basicPlatform) {
        this.basicPlatform = basicPlatform;
    }

    // 确保返回非空列表
    public String getBasicProductIndex() {
        return basicProductIndex;
    }

    public void setBasicProductIndex(String basicProductIndex) {
        this.basicProductIndex = basicProductIndex;
    }

    // 添加便捷方法
    public void addBasicPlatform(String platform) {
        if (basicPlatform == null) {
            basicPlatform = new ArrayList<>();
        }
        basicPlatform.add(platform);
    }

    public void setClassName(String className)
    {
        this.className = className;
    }

    public String getClassName()
    {
        return className;
    }
    public void setProductType(String productType)
    {
        this.productType = productType;
    }

    public String getProductType()
    {
        return productType;
    }
    public void setUploadLimit(Integer uploadLimit)
    {
        this.uploadLimit = uploadLimit;
    }

    public Integer getUploadLimit()
    {
        return uploadLimit;
    }

    public void setTimes(Integer  times)
    {
        this.times = times;
    }
    public Integer getTimes() {
        return times;
    }
    public void setUploadTaskNum(Integer  uploadTaskNum)
    {
        this.uploadTaskNum = uploadTaskNum;
    }
    public Integer getUploadTaskNum() {
        return uploadTaskNum;
    }
    public String getHost()
    {
        return host;
    }
    public void setHost(String host)
    {
        this.host = host;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("status", getStatus())
                .append("optName", getOptName())
                .append("shop", getShop())
                .append("brand", getBrand())
                .append("brandZip", getBrandZip())
                .append("basicPlatform", getBasicPlatform())
                .append("className", getClassName())
                .append("productType", getProductType())
                .append("uploadLimit", getUploadLimit())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("updateBy", getUpdateBy())
                .append("times", getTimes())
                .append("uploadTaskNum", getUploadTaskNum())
                .append("host", getHost())
                .append("basicProductIndex", getBasicProductIndex())
                .toString();
    }
}
